﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="UseCarList.aspx.cs" Inherits="ServicesSheet_UseCarList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        datamember="View_Services_UseCars" cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsCars" runat="server" selectalias="Usasdb" selectcommand="select Services_SV_Cars.CarId,&#13;&#10;Services_SV_Cars.CarName,&#13;&#10;Services_SV_Cars.PassengerNum,&#13;&#10;Services_SV_Cars.PerKMCost &#13;&#10;from &#13;&#10;Services_SV_Cars"
        cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsCarStatus" runat="server" selectalias="Usasdb" selectcommand="select Ser_SV_CarStatus.CarStatus,Ser_SV_CarStatus.CarStatusName from Ser_SV_CarStatus">
    </infolight:webdatasource>
    <infolight:webnavigator id="WebNavigator1" runat="server" bindingobject="wgvMaster"
        width="100%" statusstrip="WebStatusStrip1" oncommand="WebNavigator1_Command"
        cssclass="NavigatorBar" ctlheight="25">
        <navcontrols>
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/query_C.gif" MouseOverImageUrl="../image/uipics/query2_C.gif"
                    Size="48" />
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/print_C.gif" MouseOverImageUrl="../image/uipics/print2_C.gif"
                    Size="48" />
                    
                   <InfoLight:ControlItem controlname="Add" controltext="add" controltype="Image" controlvisible="True"
                disenableimageurl="../Image/UIPics/AddSheet2.gif" imageurl="../Image/UIPics/AddSheet.gif"
                mouseoverimageurl="../Image/UIPics/AddSheet2.gif" size="80">
            </InfoLight:ControlItem>
             <InfoLight:ControlItem ControlName="ClientQuery" ControlText="查看流程图" ControlType="Image"
                    ControlVisible="True" ImageUrl="../image/uipics/querySheet.gif" MouseOverImageUrl="../image/uipics/querySheet2.gif"
                    Size="80" />
            </navcontrols>
        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
    </infolight:webnavigator>
    <table cellpadding="0" cellspacing="7" class="TbSearch">
        <tr>
            <td style="width: 80px;">
                <asp:Label ID="Label4" runat="server" Text="用车日期："></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="dtpUDate" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})"
                    Text="" CssClass="Wdate" /></asp:TextBox>
            </td>
            <td style="width: 20px;">
                <asp:Label ID="Label1" runat="server" Text=" 至："></asp:Label>
            </td>
             <td>
               <asp:TextBox ID="dtpUDateTo" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})"
                    Text="" CssClass="Wdate" /></asp:TextBox>
            </td>
            <td style="width: 80px;">
                <asp:Label ID="Label3" runat="server" Text="车辆：" />
            </td>
            <td>
                <infolight:webrefval id="QueryCars" runat="server" datasourceid="wdsCars" datatextfield="CarName"
                    datavaluefield="CarId" width="120px">
                    <columns>
                <InfoLight:WebRefColumn ColumnName="CarId" HeadText="车辆编码" Width="100" />
                <InfoLight:WebRefColumn ColumnName="CarName" HeadText="车辆名称" Width="100" />
                <InfoLight:WebRefColumn ColumnName="PassengerNum" HeadText="最多乘客人数" Width="100" />
                <InfoLight:WebRefColumn ColumnName="PerKMCost" HeadText="每公里成本" Width="100" />
            </columns>
                </infolight:webrefval>
            </td>
            <td style="text-align: right;">
                <span class="roundbtn">
                    <asp:LinkButton ID="btnSearch" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查 询&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="btnSearch_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp; <span class="roundbtn">
                    <asp:LinkButton ID="btnClear" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;清 除&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="btnClear_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    <infolight:webgridview id="wgvMaster" runat="server" cellpadding="5" datasourceid="Master"
        forecolor="#333333" width="100%" aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" 
        queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        backcolor="White" bordercolor="White" borderstyle="Groove" borderwidth="2px"
        createinnernavigator="False" pagesize="15" 
        onrowcommand="wgvMaster_RowCommand" onrowdatabound="wgvMaster_RowDataBound">
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <navcontrols>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
         <asp:TemplateField HeaderText="查看详细" Visible="False">                    
             <itemstyle horizontalalign="Center" />
                    <itemtemplate>
                    <A href="#"><IMG style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" onclick="javascript:window.open('ViewUseCar.aspx?UseCarId=<%#Eval("UseCarId") %>','open','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=yes,width=800px,height=520px');" alt="查看详细" src="../Image/UIPics/Select.gif" /> </A>
                   </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除" >
                    <ItemTemplate>
                    <asp:ImageButton ID="del" runat="server" ImageUrl="../image/main/Error2.gif" ></asp:ImageButton> 
                    </ItemTemplate>
                     <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="用车编码" SortExpression="UseCarId">
                    <EditItemTemplate>
                        <asp:Label ID="TextBox1" runat="server" Text='<%# Bind("UseCarId") %>'  ></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                    <a href='UseCar.aspx?FLOWFILENAME=FL\ApplicateCar&NAVMODE=Modify&FLNAVMODE=Submit&Id=<%# Eval("UseCarId") %>&flowflag=<%# Eval("FlowFlag") %>&EmpId=<%# Eval("EmployeeId") %>'><%# Eval("UseCarId")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                
                  <asp:TemplateField HeaderText="车辆状态" SortExpression="CarStatus">
                  <itemtemplate>
                   <InfoLight:WebDropDownList id="WebDropDownList1" runat="server" DataValueField="CarStatus" DataTextField="CarStatusName" DataSourceID="wdsCarStatus" __designer:wfdid="w6" SelectedValue='<%# Eval("CarStatus") %>' AutoInsertEmptyData="False" Filter FilterObject OnlyShowSelectText="True" DriverObject></InfoLight:WebDropDownList>
                </itemtemplate>
                </asp:TemplateField>
                 <asp:BoundField DataField="UCDate" HeaderText="用车日期" SortExpression="UCDate" DataFormatString="{0:d}" HtmlEncode="False" />
                <asp:BoundField DataField="CarName" HeaderText="车辆名称" SortExpression="CarName" />
                <asp:BoundField DataField="EmpName" HeaderText="用车申请者" SortExpression="EmpName" />
                 <asp:BoundField DataField="DepartmentName" HeaderText="所在部门" SortExpression="DepartmentName" />
                <asp:BoundField DataField="PeoCount" HeaderText="乘车人数" SortExpression="PeoCount" />
                <asp:BoundField DataField="Cause" HeaderText="用车事由" SortExpression="Cause" />
                <asp:CheckBoxField DataField="Client" HeaderText="客户有否" SortExpression="Client" />
                <asp:BoundField DataField="FlowFlagName" HeaderText="流程标志" SortExpression="FlowFlagName" />
               
</columns>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
    </infolight:webgridview>
</asp:Content>
